# $Id: PKGBUILD 184381 2013-05-06 19:37:25Z foutrelis $
# Maintainer: Daniel Isenmann <daniel@archlinux.org>

pkgname=gegl
pkgver=0.2.0
pkgrel=8
pkgdesc="Graph based image processing framework"
arch=('i686' 'x86_64')
url="http://www.gegl.org/"
license=('GPL3' 'LGPL3')
depends=('babl' 'gtk2')
makedepends=('intltool' 'ruby' 'lua' 'openexr' 'ffmpeg' 'librsvg' 'jasper' 'exiv2')
optdepends=('openexr: for using the openexr plugin' \
            'ffmpeg: for using the ffmpeg plugin' \
            'librsvg: for using the svg plugin' \
            'jasper: for using the jasper plugin')
options=('!libtool')
source=(ftp://ftp.gimp.org/pub/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2 gegl-0.2.0-ffmpeg-0.11.diff)
sha1sums=('764cc66cb3c7b261b8fc18a6268a0e264a91d573'
          'c10fd988c634fcf0948cc91a51d6528f6f1704ba')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -p1 -i "${srcdir}/gegl-0.2.0-ffmpeg-0.11.diff"
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure  --prefix=/usr  --with-sdl --with-openexr --with-librsvg \
    --with-libavformat --with-jasper --disable-docs
  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
